package com.x.client.model;

import com.x.framework.annotation.MappingColumn;
import com.x.framework.annotation.MappingTable;
import com.x.framework.model.BaseObject;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

@MappingTable(tableName = "CLIENT_FEEDBACK")
public class Feedback extends BaseObject{

	@MappingColumn(columnName = "FEEDBACK_ID", columnPk = true, columnLength = 32)
	private String feedbackId;// 收藏ID

	@NotNull(message = "反馈内容不能为空！")
	@MappingColumn(columnName = "FEEDBACK_CONTENT")
	private String feedbackContent;// 反馈内容

	@NotNull(message = "反馈手机号不能为空！")
	@Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
	@MappingColumn(columnName = "FEEDBACK_PHONE")
	private String feedbackPhone;// 车辆ID

	@MappingColumn(columnName = "USER_ID")
	private String userId;// 用户ID

	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@MappingColumn(columnName = "FEEDBACK_CREATE_TIME")
	private Date feedbackCreateTime;// 反馈时间

	public String getFeedbackId() {
		return feedbackId;
	}

	public void setFeedbackId(String feedbackId) {
		this.feedbackId = feedbackId;
	}

	public String getFeedbackContent() {
		return feedbackContent;
	}

	public void setFeedbackContent(String feedbackContent) {
		this.feedbackContent = feedbackContent;
	}

	public String getFeedbackPhone() {
		return feedbackPhone;
	}

	public void setFeedbackPhone(String feedbackPhone) {
		this.feedbackPhone = feedbackPhone;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public Date getFeedbackCreateTime() {
		return feedbackCreateTime;
	}

	public void setFeedbackCreateTime(Date feedbackCreateTime) {
		this.feedbackCreateTime = feedbackCreateTime;
	}
}
